# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: team/gnome <ncopa@alpinelinux.org>
pkgname=gnome-online-accounts
pkgver=3.52.1
pkgrel=0
pkgdesc="Single sign-on framework for GNOME"
url="https://wiki.gnome.org/Projects/GnomeOnlineAccounts"
arch="all"
license="GPL-2.0-or-later"
depends="dbus:org.freedesktop.Secrets"
makedepends="
	docbook-xml
	docbook-xsl
	gcr4-dev
	gi-docgen
	gnome-desktop-dev
	gobject-introspection-dev
	gtk-doc
	itstool
	json-glib-dev
	keyutils-dev
	krb5-dev
	libadwaita-dev
	libsecret-dev
	libxml2-utils
	libxslt
	meson
	rest1-dev
	vala
	webkit2gtk-4.1-dev
	"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-lang $pkgname-doc"
source="https://download.gnome.org/sources/gnome-online-accounts/${pkgver%.*}/gnome-online-accounts-$pkgver.tar.xz"

build() {
	abuild-meson \
		-Db_lto=true \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

dev() {
	provides="$pkgname-static=$pkgver-r$pkgrel"
	replaces="$pkgname-static"
	default_dev
}

sha512sums="
6df42b0588a661f985509e63a823f8c3a70afff3d49743ead4c6f335524ba4586c67fa43089320130d5ade6841329c3cf58dd85edcbc28fe3fcbf1d27d28bbba  gnome-online-accounts-3.52.1.tar.xz
"
